package com.example.demo.config;

import com.example.demo.socket.GameWebSocketHandler1;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.config.annotation.*;

@Configuration
@EnableWebSocket
public class WebSocketConfig1 implements WebSocketConfigurer {
    @Override
    public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
        registry
                .addHandler(new GameWebSocketHandler1(), "/game")
                .setAllowedOrigins("*");
    }
}